package com.bases {
	import com.bases.cellItem.BaseCheckCellItem;
	import com.Interface.ICheckBoxCellRender;
	import com.Interface.IItem;
	import com.Interface.IRadioData;
	import flash.events.MouseEvent;
	import flash.text.TextFormat;

	public class TCheckBoxCellRender extends BaseCheckCellItem implements IItem {
		protected var lblText:TLable;

		public function TCheckBoxCellRender(){
			super();
			lblText = new TLable();
			this.addChild(lblText);
			this.relayout();
		}

		/**
		 *设置文本的大小
		 * @param value setFontSize(size:uint):void
		 *
		 */
		public function set setFontSize(value:uint):void {
			var font:TextFormat = new TextFormat(null, value);
			this.lblText.setTextFormat(font);
			this.lblText.defaultTextFormat = font;
		}

		public function set checkText(value:String):void {
			this.lblText.text = value;
		}

		override protected function relayout():void {
			super.relayout();
			this.check.setPos(0, 5);
			this.lblText.setPos(15, 0);
		}

		override public function set userData(value:*):void {
			super.userData = value;
			this.lblText.text = (value as IRadioData).getText();
		}
	}
}